<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>会员充值配置管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		
		function getSum(temp){
			$.ajax({ 
				url: "${ctx}/recharge/rechargeLog/queryRechargeLogSumBynumber?number="+temp,
				success: function(date){
					if(date[0].money != undefined){
				        alert(date[0].money);
					}else{
						alert("数据库查不到该数据");
					}
		      }});
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/recharge/rechargeLog/chackRechargeMoney">会员合帐信息列表</a></li>
	</ul>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr><th>姓名</th><th>会员卡号</th><th>手机号</th><th>充值表中充值额度</th><th>会员表中充值额度</th><shiro:hasPermission name="recharge:rechargeLog:view"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${list}" var="recharge">
			<tr>
				<td>${recharge.name}</td>
				<td>${recharge.number}</td>
				<td>${recharge.mobile}</td>
				<td>${recharge.recharge_money}</td>
				<td>${recharge.member_money}</td>
				<shiro:hasPermission name="recharge:rechargeLog:view"><td>
    				<a class="btn btn-success"  onclick="getSum('${recharge.number}')" >查看</a>
					<a class="btn btn-danger" href="${ctx}/recharge/rechargeLog/syncMoneyForm?number=${recharge.number}&recharge_money=${recharge.recharge_money}&member_money=${recharge.member_money}" >同步</a>
					
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
